import request from "@/utils/request.js";


// 首页轮播图关注药店 不分页
export function swiperList(data) {
    return request.get('wx/doctor/storeIndexList', data)
}
//获得药店列表
export function doctorList(data) {
    return request.get('wx/doctor/storeList', data);
}

//获得医生详情
export function doctorDetail(id) {
    return request.get('wx/doctor/detail/' + id);
}
//获得个人中心详情
export function userInfo(doctorId) {
    return request.get('wx/patient/user/' + doctorId);
}
//判断就诊人存在是否激活咨询和激活咨询信息
export function undoneConsult(patientId, doctorId) {
    return request.get('wx/order/undone/consult/' + patientId + '/' + doctorId);
}
//个人中心订单数量以及最新一个订单查询
export function orderStatusInfo() {
    return request.get('wx/patient/user/orderStatusInfo')
}

//绑定医生
export function bindDoctor(id) {
    return request.post('wx/patient/bind/doctor/' + id);
}

//广告位
export function getAdvertInfo() {
    return request.get('wx/common/getAdvertInfo');
}
//根据分类和搜索内容获得商品信息
export function getUserDrugList(data) {
    return request.get('wx/small/search/list/pageProduct', data);
}
// 获取药房分类 
export function getCateList(storeId) {
    return request.get(`wx/small/getCategoryList?storeId=${storeId}`);
}
// 线上问诊--查询医生列表
export function getSyDoctorList(data) {
    return request.get('wx/doctor/syDoctorList', data)
}
// 查询科室
export function getAllStandardDept() {
    return request.get('wx/common/getAllStandardDept')
}

// 获取优惠券
export function getUserCoupon() {
    return request.get('wx/small/getUserCoupon')
}


// 优惠券列表 各种状态
export function getUserCouponList(type,data) {
    return request.get(`wx/small/getUserCouponList?couponStatus=${type}`,data)
}

// 是否可以使用优惠券
export function getUserCouponFlag(storeId,orderId) {
    return request.get(`wx/small/getCouponByStoreId?storeId=${storeId}&orderId=${orderId}`)
}
